package com.ganbo.user.api.api;


import com.ganbo.user.api.api.config.FeignConfig;
import com.ganbo.user.api.api.fallback.UserFallbackService;
import com.ganbo.user.api.model.User;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

@FeignClient(value = "user-service", fallback = UserFallbackService.class, configuration = FeignConfig.class)
@RequestMapping("/user")
public interface UserClientApi {


    @GetMapping("/get")
    User getUser(@RequestParam Long id, @RequestParam String username);

    @PostMapping("/add")
    User add(@RequestBody User user);
}
